import 'package:json_annotation/json_annotation.dart';

part 'draw_contents.g.dart';

/// 绘画内容存储数据实体类
@JsonSerializable()
class DrawContent {
  /// 数据库表
  static String columnTabName = 'drawContent';
  static String columnId = 'id';
  static String columnName = 'name';
  static String columnContent = 'content';
  static String columnTimestamp = 'timestamp';
  static String columnDescription = 'description';

  /// 自增ID
  int? id;

  /// 名称
  String? name;

  /// 内容主体
  double? content;

  /// 时间戳
  String? timestamp;

  /// 描述
  String? description;

  /// 类型
  String? type;

  /// 状态
  String? state;

  DrawContent({
    this.name,
    this.content,
    this.timestamp,
    this.description,
    this.type,
    this.state,
  });

  factory DrawContent.fromJson(Map<String, dynamic> json) =>
      _$DrawContentFromJson(json);

  Map<String, dynamic> toJson() => _$DrawContentToJson(this);
}
